Class LowLevelReadThread

java.lang.Object
java.lang.Thread
com.cisco.pt.ptmp.impl.LowLevelReadThread
All Implemented Interfaces:
Runnable

public class LowLevelReadThread extends Thread
  • Field Details

    • messageList

      protected BlockingQueue<ByteBuffer> messageList
    • connection

      protected PacketTracerConnection connection
    • shouldStop

      protected volatile boolean shouldStop
    • useBinaryEncoding

      protected boolean useBinaryEncoding
    • inputBuffer

      protected ByteBuffer inputBuffer
    • rawBuffer

      protected byte[] rawBuffer
    • writePosition

      protected int writePosition
  • Constructor Details

  • Method Details

    • getNextMessage

      public ByteBuffer getNextMessage() throws InterruptedException
      Throws:
      InterruptedException
    • shouldStop

      public void shouldStop()
    • run

      public void run()
      Specified by:
      run in interface Runnable
      Overrides:
      run in class Thread
    • readIntoRawBuffer

      protected int readIntoRawBuffer() throws Exception
      Throws:
      Exception
    • initializeRawBuffer

      protected void initializeRawBuffer()
    • hasCompleteLengthField

      protected boolean hasCompleteLengthField()
    • getFirstTextDelimiterIndex

      protected int getFirstTextDelimiterIndex()
    • extractLengthField

      protected int extractLengthField()
    • extract

      protected byte[] extract(int length)
    • getReadSize

      protected int getReadSize()
    • getWriteSize

      protected int getWriteSize()
    • growBy

      protected void growBy(int lengthIncrease)
    • grow

      protected void grow(int length)
    • show

      protected void show(String name, byte[] buffer, int limit)